package util.AST.Comand;

import java.util.ArrayList;

import checker.SemanticException;
import checker.Visitor;

import util.AST.Statement.Statement;
import util.AST.Terminal.ID;

public class ProcedureDeclaration extends Comand{

	private ID name;
	private ArrayList<VarDeclaration> args;
	private ArrayList<FunctionDeclaration> functions;
	private ArrayList<ProcedureDeclaration> procedures;
	private ArrayList<VarDeclaration> vars;
    private ArrayList<Statement> statements;
	
	
	public ProcedureDeclaration(ID name, ArrayList<VarDeclaration> args,
			ArrayList<FunctionDeclaration> functions,
			ArrayList<ProcedureDeclaration> procedures,
			ArrayList<VarDeclaration> vars, ArrayList<Statement> statements) {
		this.name = name;
		this.args = args;
		this.functions = functions;
		this.procedures = procedures;
		this.vars = vars;
		this.statements = statements;
	}
	
	public ProcedureDeclaration(ID name,
			ArrayList<FunctionDeclaration> functions,
			ArrayList<ProcedureDeclaration> procedures,
			ArrayList<VarDeclaration> vars, ArrayList<Statement> statements) {
		this.name = name;
		this.functions = functions;
		this.procedures = procedures;
		this.vars = vars;
		this.statements = statements;
	}

	public ID getName() {
		return name;
	}

	public ArrayList<VarDeclaration> getArgs() {
		return args;
	}

	public ArrayList<FunctionDeclaration> getFunctions() {
		return functions;
	}

	public ArrayList<ProcedureDeclaration> getProcedures() {
		return procedures;
	}

	public ArrayList<VarDeclaration> getVars() {
		return vars;
	}

	public ArrayList<Statement> getStatements() {
		return statements;
	}

	@Override
	public String toString(int level) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visit(Visitor v, Object o) throws SemanticException {
		// TODO Auto-generated method stub
		return v.visitProcedureDeclaration(this, o);
	}

}
